//
//  PersonInfo.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/8/5.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "PersonInfo.h"

@interface PersonInfo()<NSCopying>
@end

@implementation PersonInfo

- (id)copyWithZone:(NSZone *)zone
{
    PersonInfo *info = [[[self class] allocWithZone:zone]init];
    info.portraitUrl = self.portraitUrl;
    info.name = self.name;
    info.mobilePhone = self.mobilePhone;
    info.position = self.position;
    info.detailedAddress = self.detailedAddress;
    info.personalizedSignature = self.personalizedSignature;
    return info;
}

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.portraitUrl = dict[@"portraitUrl"];
        self.type = [dict[@"type"] integerValue];
        self.nickName = dict[@"nickName"];
        self.status = [dict[@"status"] integerValue];
        self.clubStatus = [dict[@"clubStatus"] integerValue];
        
        self.age = [dict[@"age"] integerValue];
        self.gender = [dict[@"gender"] integerValue];
        self.birthday = dict[@"birthday"];
        self.personalizedSignature = dict[@"personalizedSignature"];
        self.roleId = [dict[@"roleId"] integerValue];
        self.roleName = dict[@"roleName"];
        self.clubId = dict[@"clubId"];
        self.registerDate = [dict[@"registerDate"] integerValue];
        self.allowStutas = [dict[@"allowStutas"] integerValue];
        self.activeValueAll = [dict[@"activeValueAll" ] floatValue];
        self.isTeach = [dict[@"isTeach"] boolValue];
        self.ticketCount = [dict[@"ticketCount"] integerValue];
        
        self.name = dict[@"name"];
        self.mobilePhone = dict[@"mobilePhone"];
        self.position = dict[@"position"];
        self.detailedAddress = dict[@"detailedAddress"];
        self.shareUrl = dict[@"shareUrl"];
        self.keepCount = [dict[@"keepCount"] integerValue];
        self.total = [dict[@"total"] integerValue];
        self.balance = [dict[@"balance"] floatValue];
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[PersonInfo alloc]initWithDict:dict];
}

@end
